import dolfinx # noqa: F401
import gmsh
import mpi4py.MPI
import viskex
import common_03_dolfinx as common # isort: skip
order = 1
Create a mesh of the reference interval with the provided order.
gmsh.initialize()
gmsh.option.setNumber("General.Verbosity", 1)
mesh, cell_tags, facet_tags = common.create_reference_interval(
mpi4py.MPI.COMM_WORLD, order=order, num_segments=6)
gmsh.finalize()
Plot the mesh.
viskex.dolfinx.plot_mesh(mesh)
viskex.dolfinx.plot_mesh(mesh, dim=0)
Plot the cell tags, identifying two subdomains.
viskex.dolfinx.plot_mesh_tags(mesh, cell_tags, "Cell tags")
Plot the facet tags, identifying two boundaries (endpoints) and one interface (the origin).
viskex.dolfinx.plot_mesh_tags(mesh, facet_tags, "Facet tags")